Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3 support #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benmwebb
Copy link

This should add full Python 3 support by making a number of simple modifications so that the code builds and runs with both Python 2 and Python 3:

  • Use print function rather than print statement;
  • Use Python 3 C API protected with preprocessor macros;
  • Replace except x,y with except x as y;
  • Use range in Python 3 rather than xrange.

Use print function rather than print statement;
use Python 3 C API; replace 'except x,y' with 'except x as y';
use 'range' rather than 'xrange'.
This should make everything work with Python 3.
@benmwebb benmwebb mentioned this pull request Oct 28, 2019
@aozalevsky
Copy link

would be very nice to see that in the master!

@benmwebb
Copy link
Author

We incorporated this into our own fork long ago: https://github.com/salilab/pyRMSD

@aozalevsky
Copy link

@benmwebb I saw that and I am very grateful to you since I am already using it in several projects which have to be updated from the python2 to 3. it was a kind of +1 message. just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants